# -*- coding: utf-8 -*-

from osv import fields,osv
from osv.orm import browse_record
import tools
from functools import partial
import pytz
import pooler
from tools.translate import _
from service import security
import netsvc

class aas_document(osv.osv):
    _name = 'aas.document'
    _description = 'Document'
    _columns = {
        'name': fields.char('Title', size=256, required=True),
        'content': fields.text('Content'),
        'type': fields.selection([('doc', 'Document'), ('faq', 'FAQ'), ('reg', 'Regulations')], 'Type', readonly=True),
    }
    
    def create(self, cr, uid, vals, context=None):
        if not context:
            context = {}
        vals['type'] = context.get('type', 'doc')
        return super(aas_document, self).create(cr, uid, vals, context)
aas_document()



# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
